
package horde.control;

import horde.interfaces.ItfBehavior;
import horde.patterns.Core;
import horde.patterns.Msg;

/**
 * @author Arturo Mazón
 */
public class DummyBehavior implements ItfBehavior {
    protected Core core;

    public DummyBehavior () {
        core = null;
    }

    public DummyBehavior (Core core) {
        this.core = core;
    }

    public boolean process(Msg msg) {
        if (msg.getType().equals(Msg.TYPE_REQUEST)) {
            Object [] trunk = msg.getTrunk();
            if (trunk != null) return core.runTask(trunk);
            else return false;
        } else return false;
    }

    public void setCore(Core core) { this.core = core; }
    public Core getCore() { return core; }
    public String getDefaultActionRequest () { return null; }
}
